﻿<%@ Page Title="Home Page" Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs"
    Inherits="KBVault.Web._Default" %>
<%@ Register Src="~/Public/UC/KBTagCloud.ascx" TagName="TagCloud" TagPrefix="KB" %>
<html>
<head id="Head1" runat="server">
    <title>KBVault - Free Knowledge Base Application</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,600,800' rel='stylesheet'
        type='text/css' />
    <link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css">
    <link href="/assets/css/bootstrap.min.css" rel="stylesheet" />
    <link href="/assets/css/font-awesome.min.css" rel="stylesheet" />
    <link href="/assets/css/site.css" rel="stylesheet" />
</head>
<body>
    <form id="Form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
        <header class="jumbotron subhead" id="overview">
            <div class="container">            
                <h1>
                    <a href="/Default.aspx"><span runat="server" id="htmlCompanyName"></span></a> 
                    <small runat="server" id="htmlTagline"></small>
                </h1>
                <p runat="server" id="htmlJumbotronText" class="lead"></p>
            </div>
        </header>
        <div class="container">
            <div class="row">
                <div class="input-group input-group-lg">
                    <asp:TextBox CssClass="form-control" placeholder="Enter search text" runat="server"
                        ID="txtSearch" ClientIDMode="Static"></asp:TextBox>
                    <span class="input-group-btn">
                        <asp:Button class="btn btn-default" Text="Search" runat="server" 
                        ID="btnSearch" onclick="btnSearch_Click" />
                    </span>
                </div>
            </div>
            <br />
            <div class="row">
                <div class="col-lg-10">
                    <h4 class="section-title clearfix">
                        <span class="line"></span><i class="fa fa-folder-open-o fa-fw text-muted"></i>Hot
                    </h4>
                    <div class="row">
                        <asp:Repeater runat="server" ID="rptHotCategories" OnItemDataBound="rptHotCategories_ItemDataBound">
                            <ItemTemplate>
                                <div class="col-lg-6">
                                    <span class="row"><i class="fa fa-folder-open-o fa-fw text-muted"></i>
                                        <%#Eval("Name")%>
                                        <span class="badge">
                                            <%# Eval("PublicArticleCount") %></span> </span><span class="row">
                                                <ul class="fa-ul">
                                                    <asp:Repeater runat="server" ID="rptArticles">
                                                        <ItemTemplate>
                                                            <li><i class="fa-li fa fa-list-alt fa-fw text-muted"></i><a href='<%# String.Format("/Public/ShowArticle.aspx?Article={0}",Eval("Id")) %>'>
                                                                <%#Eval("Title") %></a> </li>
                                                        </ItemTemplate>
                                                    </asp:Repeater>
                                                </ul>
                                            </span>
                                </div>
                            </ItemTemplate>
                        </asp:Repeater>
                    </div>
                    <br />
                    <div class="row">
                        <div class="col-lg-6">
                            <h4 class="section-title clearfix">
                                <span class="line"></span>Latest Articles</h4>
                            <span class="row">
                                <ul class="fa-ul">
                                    <asp:Repeater runat="server" ID="rptLatestArticles">
                                        <ItemTemplate>
                                            <li><i class="fa-li fa fa-list-alt fa-fw text-muted"></i><a href='<%# String.Format("/Public/ShowArticle.aspx?Article={0}",Eval("Id")) %>'>
                                                <%#Eval("Title") %>
                                            </a></li>
                                        </ItemTemplate>
                                    </asp:Repeater>
                                </ul>
                            </span>
                        </div>
                        <div class="col-lg-6">
                            <h4 class="section-title clearfix">
                                <span class="line"></span>Popular Articles</h4>
                            <span class="row">
                                <ul class="fa-ul">
                                    <asp:Repeater runat="server" ID="rptPopularArticles">
                                        <ItemTemplate>
                                            <li><i class="fa-li fa fa-list-alt fa-fw text-muted"></i><a href='<%# String.Format("/Public/ShowArticle.aspx?Article={0}",Eval("Id")) %>'>
                                                <%#Eval("Title") %></a></li>
                                        </ItemTemplate>
                                    </asp:Repeater>
                                </ul>
                            </span>
                        </div>
                    </div>
                </div>
                <div class="col-lg-2">
                    <h4 class="section-title clearfix">
                        <span class="line"></span><i class="fa fa-folder-open-o fa-fw text-muted"></i>Categories
                    </h4>
                    <ul class="nav nav-pills nav-stacked nav-categories">
                        <asp:Repeater runat="server" ID="rptCategories">
                            <ItemTemplate>
                                <li><a href='<%# String.Format("/Public/ShowCategory.aspx?Category={0}",Eval("Id")) %>'>
                                    <%#Eval("Name")%></a></li>
                            </ItemTemplate>
                        </asp:Repeater>
                    </ul>
                     <h4 class="section-title clearfix">
                        <span class="line"></span><i class="fa fa-folder-open-o fa-fw text-muted"></i>Popular Tags
                    </h4>
                    <KB:TagCloud runat="server" id="PopularTags"></KB:TagCloud>
                </div>
            </div>
        </div>
    
    <div id="footer">
        <div class="container" runat="server" id="htmlFooterContainer">            
        </div>
    </div>
    </form>
    <!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
    <script src="https://code.jquery.com/jquery.js" type="text/javascript"></script>
    <!-- Include all compiled plugins (below), or include individual files as needed -->
    <script src="/assets/js/bootstrap.min.js" type="text/javascript"></script>
    <script type="text/javascript" src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
    <script type="text/javascript" src="/assets/js/site.events.js"></script>
</body>
</html> 